#pragma once
#include "BaseBuff.h"
#include "Effect.h"
#include "StateBar.h"

#define EFFECT_DISTANCE 200
#define MAGNET_TIME 1 // time delay to begin being effect by magnet

// Effect
#define TIME_DELAY 0.5f
#define TIME_FADEOUT 0.5f
#define WAVE_COLOR ccc3(252, 190, 75)
#define DEFAULT_SCALE 3.0f
#define MAX_WAVE 3

class MagnetBuff : public BaseBuff
{
public:
	MagnetBuff(void);
	~MagnetBuff(void);

	virtual bool init();

	virtual void onStart( StateBar* stateBar );

	virtual void onComplete();

	CC_SYNTHESIZE_RETAIN(Effect*, _effect, Effect);
	CC_SYNTHESIZE_RETAIN(StateBar*, _stateBar, StateBar);
	CC_SYNTHESIZE_RETAIN(CCArray*, _listWave, Waves);
	CC_SYNTHESIZE(float, _currentTime, CurrentTime);

	void processing(float dt);

	CREATE_FUNC(MagnetBuff);
};

